<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}">

    {% block title %}
    <title>
        {% if title %}{{ title }}{% else %}Home Page{% endif %}
    </title>
    {% endblock %}
</head>

<body>
    <div class="container">
        <header
            class="d-flex flex-wrap align-items-center justify-content-center justify-content-md-between py-3 mb-4 border-bottom">
            <a href="#" class="d-flex align-items-center col-md-1 mb-2 mb-md-0 text-dark text-decoration-none">
                Hello, {{ current_user.user_name }}
            </a>

            <ul class="nav col-12 col-md-auto mb-2 justify-content-center mb-md-0">
                <li><a href="{{ url_for('user.index', username=current_user.user_name) }}"
                        class="nav-link px-3 link-secondary">Home</a></li>
                <li><a href="{{ url_for('user.order', username=current_user.user_name) }}"
                        class="nav-link px-3 link-secondary">Orders</a></li>
            </ul>

            <div class="col-md-1 text-end">
                <a class="btn btn-primary" href="{{ url_for('auth.logout') }}">Logout</a>
            </div>
        </header>
    </div>

    <script src="{{ url_for('static', filename='scripts/bootstrap.min.js') }}"></script>
	<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>

    {% block user_content %}
    {% endblock %}
 
    <script src="../../static/scripts/noti.js"></script>
</body>

</html>